- return unless can?(current_user, :update_max_pages_size)
- expanded = expanded_by_default?

%section.settings.gs-pages.no-animate#js-pages-settings{ class: ('expanded' if expanded) }
  .settings-header
    %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only{ role: 'button' }
      = _('Pages')
    = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do
      = expanded ? _('Collapse') : _('Expand')
    - pages_link_url = help_page_path('administration/pages/index', anchor: 'set-maximum-size-of-each-gitlab-pages-site-in-a-group')
    - pages_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: pages_link_url }
    %p= s_('GroupSettings|Set a size limit for all content in each Pages site in this group. %{link_start}Learn more.%{link_end}').html_safe % { link_start: pages_link_start, link_end: '</a>'.html_safe }

  .settings-content
    = render 'groups/settings/pages_settings'
